/*
 * Powered By XY
 * Since 2020
 */

package com.xy.biz.uc.manager;

import com.xy.biz.uc.domain.bo.TeamBO;
import com.xy.biz.uc.domain.bo.TeamUserRelBO;
import com.xy.biz.uc.domain.query.TeamQuery;
import com.xy.biz.uc.domain.query.TeamUserRelQuery;
import com.xy.biz.uc.domain.req.DeleteTeamUserRelRequest;
import com.xy.biz.uc.domain.req.SaveTeamUserRelRequest;
import com.xy.biz.uc.domain.req.UpdateTeamUserRelRequest;

import java.util.Collection;
import java.util.List;

/**
 *
 *
 * @author yzh
 * @date 2021-4-26
 */
public interface TeamManager {

	/**
	 * 保存
	 *
	 * @param teamBO
	 */
	int saveTeam(TeamBO teamBO);

	/**
	 * 更新
	 *
	 * @param teamBO
	 */
	int updateTeam(TeamBO teamBO);

	/**
	 * 删除
	 *
	 * @param teamId
	 */
	int deleteTeam(Long teamId);

	/**
	 * 查找一个
	 *
	 * @param teamId
	 * @return
	 */
	TeamBO getTeam(Long teamId);

	/**
	 * 查找多个
	 *
	 * @param collection 标识集合
	 */
	List<TeamBO> listTeamById(Collection<Long> collection);

	/**
	 * 查找多个
	 *
	 * @param query 查找条件
	 */
	List<TeamBO> listTeam(TeamQuery query);

	/**
	 * 统计个数
	 *
	 * @param query 查找条件
	 */
	int countTeam(TeamQuery query);

	/**
	 * 查找多个
	 *
	 * @param query 查找条件
	 */
	List<TeamUserRelBO> listTeamUserRel(TeamUserRelQuery query);

	int deleteTeamUserRel(DeleteTeamUserRelRequest request);

	int updateTeamUserRel(TeamUserRelBO teamUserRelBO);

	int inviteJoin(SaveTeamUserRelRequest request);
}
